module_adapter: Don't propagate ENOSPC and ENODATA error codes#10033
Merged
lgirdwood merged 1 commit intothesofproject:mainfrom May 29, 2025
Merged
module_adapter: Don't propagate ENOSPC and ENODATA error codes#10033lgirdwood merged 1 commit intothesofproject:mainfrom
lgirdwood merged 1 commit intothesofproject:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates module processing routines to suppress non-critical ENOSPC and ENODATA errors, preventing them from halting the pipeline while still logging genuine failures.
- Filter out and clear
ENOSPC/ENODATAinmodule_adapter_sink_source_copy - Mirror the same swallow-and-log behavior in the generic module’s
processimplementation
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/audio/module_adapter/module_adapter.c | Refactored error check to log only non-ENOSPC/ENODATA errors and reset others to zero |
| src/audio/module_adapter/module/generic.c | Added identical error filtering in the generic module’s process path |
Comments suppressed due to low confidence (2)
src/audio/module_adapter/module_adapter.c:995
- Using
%xto format a signed error code can be misleading; consider switching to%dfor consistency with other logging calls.
comp_err(dev, "module_adapter_sink_source_copy() process failed with error: %x",
src/audio/module_adapter/module_adapter.c:993
- This new branch swallows
ENOSPCandENODATA—adding unit tests to verify that these codes are ignored but other errors still propagate would help prevent regressions.
if (ret) {
marcinszkudlinski
approved these changes
May 27, 2025
wszypelt
approved these changes
May 27, 2025
lyakh
reviewed
May 28, 2025
tmleman
approved these changes
May 28, 2025
Do not pass non-critical ENOSPC and ENODATA error codes from a module processing function to the pipeline. The pipeline will stop and enter xrun recovery if a module processing function returns a non-zero value. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
serhiy-katsyuba-intel
approved these changes
May 29, 2025
abonislawski
approved these changes
May 29, 2025
lgirdwood
approved these changes
May 29, 2025
lyakh
reviewed
May 30, 2025
| comp_err(dev, "module_adapter_sink_source_copy() process failed with error: %x", | ||
| ret); | ||
| if (ret) { | ||
| if (ret != -ENOSPC && ret != -ENODATA) |
Collaborator
There was a problem hiding this comment.
@softwarecki now I'm confused even more... module_process_sink_src() now cannot return -ENOSPC or -ENODATA, why are we still checking for them? If I'm right - can we improve this in a follow-up?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Do not pass non-critical
ENOSPCandENODATAerror codes from a module processing function to the pipeline. The pipeline will stop and enter xrun recovery if a module processing function returns a non-zero value.